package com.tangmin.dao.impl;/**
 * @ClassName UserDaoImpl
 * @Description TODO
 * @date 2021/9/17 17:25
 * @Version 1.0
 */

import com.tangmin.dao.UserDao;
import com.tangmin.domain.User;

import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 * UserDao的实现类
 *
 * @author YourName
 * @date 2021-09-17 17:25
 **/
public class UserDaoImpl implements UserDao {
    private String username;
    private int age;
    private List<String> strList;
    private Map<String, User> userMap;
    private Properties properties;
    public void setUsername(String username) {
        this.username = username;
    }

    public void setStrList(List<String> strList) {
        this.strList = strList;
    }

    public void setUserMap(Map<String, User> userMap) {
        this.userMap = userMap;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setAge(int age) {
        this.age = age;
    }

//    public UserDaoImpl() {
//        System.out.println("UserDaoImpl无参构造方法被调用了");
//    }

    @Override
    public void show() {
        System.out.println("UserDaoImpl 的 show方法被调用了");
    }

    @Override
    public void save() {
        System.out.println(username+"====="+age);
        System.out.println(strList);
        System.out.println(userMap);
        System.out.println(properties);
        System.out.println("UserDaoImpl 的 save方法被调用了");
    }

    public void init(){
        System.out.println("初始化方法");
    }

    public void destroy() {
        System.out.println("销毁方法");
    }
}
